package com.jimmy.medical.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 医院科室
 * 
 * @author jimmy
 * @since 0.1
 */
@Entity
@Table(name = "hospital_department")
public class HospitalDepartment extends AbstractEntity {
	/** 所属医院*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "hospital_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private Hospital hospital;
	/** 科室类型代码*/
	@Column(name = "department_type_code", length = 10)
	private String departmentTypeCode;
	/** 科室类型名称*/
	@Column(name = "department_type_name", length = 100)
	private String departmentTypeName;
	/** 科室名称*/
	@Column(name = "department_name", length = 100)
	private String departmentName;
	/** 科室名称首字母*/
	@Column(name = "first_letter", length = 20)
	private String firstLetter;
	
	/**
	 * LOGO
	 */
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "logo")
    @NotFound(action = NotFoundAction.IGNORE)
	private UploadFile logo;

	@Column(name = "create_time", length = 20)
	private String createTime;
	@Column(name = "create_user", length = 50)
	private String createUser;
	@Column(name = "update_time")
	private String updateTime;
	@Column(name = "update_user", length = 20)
	private String updateUser;

	public Hospital getHospital() {
		return hospital;
	}

	public void setHospital(Hospital hospital) {
		this.hospital = hospital;
	}

	public String getDepartmentTypeCode() {
		return departmentTypeCode;
	}

	public void setDepartmentTypeCode(String departmentTypeCode) {
		this.departmentTypeCode = departmentTypeCode;
	}

	public String getDepartmentTypeName() {
		return departmentTypeName;
	}

	public void setDepartmentTypeName(String departmentTypeName) {
		this.departmentTypeName = departmentTypeName;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public String getFirstLetter() {
		return firstLetter;
	}

	public void setFirstLetter(String firstLetter) {
		this.firstLetter = firstLetter;
	}

	public UploadFile getLogo() {
		return logo;
	}

	public void setLogo(UploadFile logo) {
		this.logo = logo;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
}
